package oop2;

import oop1.School;

/**
 * @author oldliu
 * @since 1.0
 */
public class Calc {
    public void inc1(int num){
        num+=1;
        System.out.println("在clac中，num="+num);
    }
    public void inc2(School s){
        s.rooms+=1;
        s.labs+=1;
    }
    //>>>.
    public void inc4(School s){
        s=new School();//!!!!!!
        s.rooms=100;
        s.labs=100;
    }
    public void inc3(School []p){
        for (int i = 0; i < p.length; i++) {
            p[i].rooms=i+1;
            p[i].labs=i+1;
        }
    }

}
